﻿@using KRM.Core
@{
    ViewBag.Title = "Add Types & Titles";
    Layout = "~/Views/Shared/_PopupLayout.cshtml";
}
<script>
    $(document).ready(function () { ShowAllTitleType(@(Request["taskTypeId"]??"0")); })
</script>
<div style="padding: 10px">
    @Html.Partial("Partial/_MessageResult")
    <div class="row-fluid">
        <div class="span6">
            <input type="checkbox" name="ShowAll" id="ShowAll"value="1" style="float: left" onchange="ShowAllTitleType()" />
            <label for="ShowAll" style="width: 100px;">Show All</label>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span6">
          
            <div style="height:380px; overflow: auto; margin-bottom: 10px; border: solid 1px gray;">
                <table class="table table-bordered tbl-selected">
                    <thead>
                        <tr>
                            <th>Task Type</th>
                            <th>Order</th>
                            <th>Visible</th>
                        </tr>
                    </thead>
                    <tbody id="LstTaskTypes">
                    </tbody>
                </table>
            </div>
            <form id="frViewTaskTypes">
                
                <div class="row-fluid">
                    <div class="span4">
                        <input type="hidden" name="TaskTypeId" id="TaskTypeId" value="0"/>
                        Task type:
                    </div>
                    <div class="span8">
                        <input type="text" name="TaskType" id="TaskType"class="input-block-level" value=""/>
                    </div>
                </div>

                <div class="row-fluid">
                    <div class="span4">
                        Order:
                    </div>
                    <div class="span8">
                        <input type="text" name="TTOrder" id="TTOrder" class="input-block-level" value=""/>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span12 text-right">
                        <button type="reset" class="btn btn-success" onclick="$('#submitType').html('Add');$('#TaskTypeId').val(0);">New</button>
                        <button type="submit" id="submitType" class="btn btn-primary">Add</button>
                    </div>
                </div>
            </form>


        </div>
        <div class="span6">
            <div style="height: 380px; overflow: auto; margin-bottom: 10px  ;border: solid 1px gray;">
                <table class="table table-bordered  tbl-selected">
                    <thead>
                        <tr>
                            <th>Task Title</th>
                            <th>Asign To Group</th>
                            <th>Visible</th>
                        </tr>
                    </thead>
                    <tbody id="LstTaskTitles">
                    </tbody>
                </table>
            </div>
           <form id="frViewTaskTitles" action="/orderview/SaveTaskTypes" method="GET">
                <div class="row-fluid">
                    <div class="span4">
                        <input type="hidden" name="TaskTitleId" id="TaskTitleId" value="0"/>
                        Task title:
                    </div>
                    <div class="span8">
                        <input type="text" name="TaskTitle"id="TaskTitle" class="input-block-level"/>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">
                        Asign to group:
                    </div>
                    <div class="span8">
                        <input type="text" name="AssignToGroupId"id="AssignToGroupId" class="input-block-level"/>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span12 text-right">
                        <button type="reset" class="btn btn-success" onclick="$('#submitTitle').html('Add');$('#TaskTitleId').val(0);">New</button>
                        <button type="submit" id="submitTitle" class="btn btn-primary">Add</button>
                    </div>
                </div>
            </form>

        </div>
    </div>
    <div class="row-fluid" style="margin-top: 5px">
        <div class="span6">
             <a class="btn btn-primary" onclick="javascript:window.history.back()">Back</a>
        </div>
        <div class="span6 text-right">
            <button class="btn" onclick=" javascript:window.close(); ">Close</button>
        </div>
    </div>
</div>


